import request from '@/utils/request'

// 获取消息列表
export const messageListApi = (params) => {
  return request({
    url: '/bopeng-cms/rule/list',
    method: 'get',
    params
  })
}

// 发送消息
export const sendMessageApi = (data) => {
  return request({
    url: `/bopeng-cms/sse/send?fromUserId=${data.fromUserId}&toUserId=${data.toUserId}`,
    method: 'post',
    data
  })
}